
import * as types from './constants';
import { Map } from 'immutable';
const defaultState = Map({
  banners: [],
  recommendList: [],
  enterLoad: true
})
const reducer = (state = defaultState, actions) => {
  switch (actions.type) {
    case types.CHANGE_BANNER:
      return state.set('banners', actions.data)
    case types.CHANGE_ENTER_LOAD:
      return state.set('enterLoad', actions.data)
    case types.CHANGE_RECOMMEND:
      return state.set('recommendList', actions.data)
    default:
      return state
  }
}
export default reducer